﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpMUD.Framework.Workflow.Generic
{
    public class InvalidExecutionStatusTransitionException
        : System.Exception
    {
        public InvalidExecutionStatusTransitionException(IExecutionStatusToken currentStatus, IExecutionStatusToken attemptedStatus)
        {
            if (currentStatus == null) throw new ArgumentNullException("currentStatus");
            if (attemptedStatus == null) throw new ArgumentNullException("attemptedStatus");
            this.CurrentStatus = currentStatus;
            this.AttemptedStatus = attemptedStatus;
        }

        public InvalidExecutionStatusTransitionException(IExecutionStatusToken currentStatus, IExecutionStatusTransitionToken attemptedStatus)
            : this(currentStatus,attemptedStatus as IExecutionStatusToken)
        {
        }

        public IExecutionStatusToken CurrentStatus { get; private set; }
        public IExecutionStatusToken AttemptedStatus { get; private set; }
    }
}
